import {
  selectLayout,
  setLayout,
} from "@/store/reducer/layoutSlice";
import { shallowEqual, useDispatch, useSelector } from "react-redux";

export const useLayout = () => {
  const dispatch = useDispatch();
  return {
    layout: useSelector(selectLayout, shallowEqual),
    setLayout: (options: {}) => dispatch(setLayout(options)),
  };
};

export default useLayout;
